#include <iostream>
#include <string>
#include <cstring>
#include <algorithm>
#include <vector>
#include <map>
using namespace std;

long long n, k;
const long long maxn = 1e5 + 10;
long long L[maxn];
long long maxlen = 0;

long long isaviable(long long len)
{
    long long ans = 0;
    for (long long i = 1; i <= n; i++)
    {
        ans += L[i] / len;
    }
    if (ans >= k)
        return 1;
    else
        return 0;
    
}

int main()
{
    cin >> n >> k;
    for (long long i = 1; i <= n; i++)
    {
        cin >> L[i];
        if(L[i]>maxlen)
            maxlen = L[i];
    }
    long long left = 1;
    long long right = maxlen;
    long long last = 0;

    while (left <= right)
    {
        long long mid = (left + right) / 2;
        long long res = isaviable(mid);
        if(res==1){
            left = mid + 1;
        }
        else {
            right = mid -1 ;
        }
    }

    cout << right<<endl;
    //system("pause");
    return 0 ;
}